package com.gitee.chili.leisure.service;

import cn.hutool.json.JSONObject;
import com.gitee.chili.leisure.ResponseResult;
import com.gitee.chili.leisure.config.FeignDefaultConfiguration;
import feign.Headers;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;

import java.net.URI;

/**
 * GameTaskTransferClient
 *
 * @author week solider
 * @since 2020.09.17
 */
@FeignClient(name = "game-service", configuration = FeignDefaultConfiguration.class)
public interface GameTaskTransferClient {

    @RequestLine("POST")
    @Headers({"Content-Type:application/json;charset=UTF-8"})
    <T> ResponseResult<T> handler(URI baseUri, @RequestBody JSONObject data);
}
